<?php
use app\models\System;

/**
 * @var $this yii\web\View
 */

$this->title = '控制台';
$this->params['breadcrumbs'][] = $this->title;

?>
<ul id="tasks" class="item-list">
    <li class="item-orange clearfix">
        <span class="lbl">平台版本：<?php echo System::getConfig('system_version');?></span>
    </li>

    <li class="item-default">
        <pre><?php $fp = popen('top -b -n 1', 'r');$top = '';while(!feof($fp)) {$top .= fread($fp, 1024);}pclose($fp);$top = explode("\n\n", $top);echo $top[0];?></pre>
    </li>

    <li class="item-default">
        <pre><?php $fp = popen('df -h', 'r');$df = '';while(!feof($fp)) {$df .= fread($fp, 1024);}pclose($fp);echo $df;?></pre>
    </li>

    <li class="item-default">
        <span class="lbl">WEB服务器：<?php echo $_SERVER['SERVER_SOFTWARE'];?></span>
    </li>

    <li class="item-default">
        <span class="lbl">PHP版本：<?php echo PHP_VERSION;?></span>
    </li>

    <li class="item-default">
        <span class="lbl">扩展支持：<?php echo implode(' ', get_loaded_extensions());?></span>
    </li>

    <li class="item-default">
        <span class="lbl">内存限制：<?php echo get_cfg_var ("memory_limit")?get_cfg_var("memory_limit"):"无";?></span>
    </li>

    <li class="item-default">
        <span class="lbl">最大上传文件大小：<?php $max_upload = ini_get("file_uploads") ? ini_get("upload_max_filesize") : "Disabled";echo $max_upload;?></span>
    </li>

    <li class="item-default">
        <span class="lbl">最大执行时间：<?php echo ini_get("max_execution_time");?>秒</span>
    </li>

    <li class="item-default">
        <span class="lbl">当前服务器时间：<?php echo date("Y-m-d H:i:s", time());?></span>
    </li>
</ul>
